<template>
      
  <div style="padding: 0 15px;"  @click="toggleClick">
    <svg xmlns="http://www.w3.org/2000/svg"
      class="hamburger" 
      :class="{'is-active':!isActive}"
      width="28.037" height="22.516" viewBox="0 0 28.037 22.516">
      <path id="缩进" d="M15.729,16.8l9.563-9.562a1.681,1.681,0,0,1,2.384,0l1.589,1.589a1.681,1.681,0,0,1,0,2.384L22.493,18l6.778,6.778a1.681,1.681,0,0,1,0,2.384l-1.589,1.6a1.681,1.681,0,0,1-2.384,0L15.736,19.2a1.683,1.683,0,0,1-.007-2.391Zm-13.5,2.4,9.563,9.563a1.681,1.681,0,0,0,2.384,0l1.589-1.589a1.681,1.681,0,0,0,0-2.384L8.993,18l6.778-6.778a1.681,1.681,0,0,0,0-2.384l-1.589-1.6a1.681,1.681,0,0,0-2.384,0L2.236,16.8a1.683,1.683,0,0,0-.007,2.4Z" transform="translate(-1.73 -6.742)" fill="#d6d6d6"/>
    </svg>
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style scoped>
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: 22px;
  color: #D6D6D6;
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
